-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix gcc11 compatibility #4803
fix gcc11 compatibility #4803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your interesting in LightGBM!
Can you clarify what you mean by "gcc11 using the c++20 standard"? Did you modify this line that declares that LightGBM follows c++11?
Line 295 in bfb346c
"${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wextra -Wall -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-return-type" |
And if so, could you help us understanding how C++20 compatibility would help you?
My concern is that right now this project doesn't have tests compiling LightGBM following C++20, so there's even if your PR provides that compatibility today, there's no guarantee that a future PR won't break it. I'd like to understand why supporting a different standard is important to you.
Hey James, Sorry I think I was being a bit unclear. I made no other changes but the ones I submitted. I referred to the project using lightgbm being under c++20, which as you pointed out should've made no difference. I can see how this can be confusing. I'll edit the issue now to make it clearer. Alex |
I ran a series of tests against the same set of compilers (gcc 10/11, clang 12) in a separate, lightgbm-only environment. All the results are the same: gcc11 is the only one failing before my change, and none of them fail after my change |
We are compiling LightGBM with gcc-11 at our CI and have no issues: Lines 4 to 5 in bfb346c
https://github.com/microsoft/LightGBM/runs/4212251986?check_suite_focus=true#step:3:601 Please at least provide the error logs you've observed in your environment. |
Sure, please see the log below:
|
@aleqs thanks, I think we need more information to understand what's different between your environment and this project's existing CI jobs using Could you please provide the following?
We really appreciate you taking the time to report this and propose this PR, but need to fully understand the issue to be more confident in the fix. |
Alright, I'll get back to you with this a bit later, this will take some time on my side |
Hey, sorry about the delay. It looks like I won't have time to look into this properly in the foreseeable future, so probably best to mark this issue accordingly and/or close it. |
Thanks @aleqs , we'll close this for now. If you come back to it in the future and are able to provide a reproducible example, we'll be happy to help. |
HI, I am getting the same error using conan (v1) package on v 3.3.5 cmake version 3.26.1 lightgbm/3.3.5: Calling build() https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546183.html
|
Thanks for that! But let's move the discussion off of this old closed PR and to a new issue. I just opened #6033. I'm also working (indirectly) on adding C++20 support in #5981. If you have any additional details to share that might help with that, please comment on #6033. I'm going to lock discussion here. |
Hey,
I recently switched from gcc 10 to gcc 11 (in the project using the c++20 standard) and discovered lightgbm sources no longer compiled for me. This PR fixes the issue for me. No logic is affected, and I checked build compaitbility against gcc 10/11 and clang 12 before submitting.
Alex